package com.tian.service.impl;

import com.github.pagehelper.PageHelper;
import com.tian.mapper.BeautyMapper;
import com.tian.pojo.Beauty;
import com.tian.service.BeautyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BeautyServiceImpl implements BeautyService {
    @Autowired
    private BeautyMapper beautyMapper;
    @Override
    public List<Beauty> getAllBeauty(Integer page, Integer size) {
        PageHelper.startPage(page,size);
        return beautyMapper.getAllBeauty(page,size);
    }

    @Override
    public void addBeauty(Beauty beauty) {
        beautyMapper.addBeauty(beauty);
    }
}
